<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>注册</title>
        
        <link rel="stylesheet" href="styles/register.css">
		<!--导入jquery-->
	<script src="scripts/jquery-3.3.1.js"></script>
		<script>
			<!--用户名的校验 --> 
			function checkUserName(){
				var username = $("#username").val();
				var reg = /^\w{5,10}$/;
				var tag = reg.test(username);
				if (!tag) {
					//表示不符合规则
					$("#username").css("border","1px solid red");
					//当失去焦点的时候自动清空文本内容
					//$("#username").val("");
				}else {
					$("#username").css("border","1px solid black");
				}
				return tag;
			}
			<!--密码的校验 -->
			function checkPassword(){
				var password = $("#password").val();
				var reg = /^\w{5,10}$/;
				var tag = reg.test(password);
				if (!tag) {
					//表示不符合规则
					$("#password").css("border","1px solid red");
				}else {
					$("#password").css("border","1px solid black");
				}
				return tag;
			}

		

		</script>
    </head>
	<body>
	<!--引入头部-->
	<div id="header"></div>
        <!-- 头部 end -->
    	<div class="rg_layout">
    		<div class="rg_form clearfix">

    			<div class="rg_form_left">

    				<p>新用户注册</p>
    				<p>USER REGISTER</p>
    			</div>
    			<div class="rg_form_center">

					<div id="errorMsg" style="text-align: center;color: red"></div>
					<!--注册表单-->
    				<form id="registerForm" action="register" method="post">
						<!--提交处理请求的标识符-->
						<input type="hidden" name="action" value="register">
    					<table style="margin-top: 25px;">
    						<tr>
    							<td class="td_left">
    								<label for="username">用户名:</label>
    							</td>
    							<td class="td_right">
    								<input type="text" id="username" name="username" placeholder="请输入姓名">
    							</td>
    						</tr>
    						<tr>
    							<td class="td_left">
    								<label for="password">密码:</label>
    							</td>
    							<td class="td_right">
    								<input type="text" id="password" name="password" placeholder="请输入密码">
    							</td>
    						</tr>
    						
    						<tr> 
    							<td class="td_left"> 
    							</td>
    							<td class="td_right check"> 
    								<input type="submit" class="submit" value="注册">
									<span id="msg" style="color: red;"></span>
    							</td>
    						</tr>
    					</table>
    				</form>
    			</div>
    			<div class="rg_form_right">
    				<p>
    					已有账号？
    					<a href="login.jsp">立即登录</a>
    				</p>
    			</div>
    		</div>
    	</div>
        <!--引入尾部-->
    	<div id="footer"></div>
		<!--导入布局js，共享header和footer-->
		<script type="text/javascript" src="scripts/include.js"></script>
    </body>
